<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorator="admin/layout">
<head>
<title>会员管理</title>
<script th:inline="javascript">
	/*<![CDATA[*/
	 $(document).ready(function(){

		 $("#informationForm").validate({
	         rules:{
	        	 name:{
	            	 required:true,
	            	 maxlength:10
	             },sort:{
	            	 required:true,
	            	 number:true,
	            	 rang:[0,254]
	             }
	             
	             
	             
	              
	         },
	         messages:{
	             name:{
	                 required:"请输入名称"
	             },sort:{
	                 required:"请输入价格",
	                 number:"请输入正确的金额"
	             }
	         }
	         
	      });
		 
	  });
	
			/*]]>*/
</script>
</head>
<body>
<div layout:fragment="content">
	<div class="row">
		<div class="col-md-12">
			<div class="btn-group pull-right">
				<a href="index.html" th:href="@{/admin/system/information/index/}" id="sample_editable_1_new" class="btn green">返回<i class="fa fa-arrow-circle-o-left"></i></a>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<div class="form">
				<form role="form" th:action="@{/admin/system/information/save}" th:object="${information}" id="informationForm" method="post" class="form-horizontal">
					<h4 class="form-section">网站信息</h4>
					<input type="hidden" th:field="*{id}" />
					<div class="form-body">
						
						<div class="form-group" th:class="${#fields.hasErrors('name')}? 'form-group has-error' : 'form-group'">
							<label class="control-label col-md-3">网站信息标题:<span class="required" aria-required="true">* </span></label>							
							<div class="col-md-4">
								<input type="text" class="form-control" placeholder="网站信息标题" th:field="*{name}"/>
							</div>
						</div>
						<div class="form-group" th:class="${#fields.hasErrors('sort')}? 'form-group has-error' : 'form-group'">
							<label class="control-label col-md-3">网站信息标题:<span class="required" aria-required="true">* </span></label>							
							<div class="col-md-4">
								<input type="text" class="form-control" placeholder="网站信息标题" th:field="*{sort}"/>
							</div>
						</div>
						<div class="form-group">
						<label class="control-label col-md-3">内容:</label>
								<div class="col-md-4">
									<textarea id="textarea_content" rows="4" type="text"
										class="form-control" placeholder="内容" th:field="*{content}" />
								</div>
						</div>
						
					</div>
					<div class="form-actions fluid">
						<div class="col-md-offset-3 col-md-9">
							<button type="submit" class="btn blue" name="sub">提交</button>
						</div>
					</div>
				</form>		
			</div>
		</div>
	</div>
</div>	
</body>
</html>

 <script th:inline="javascript">
/*<![CDATA[*/
           KindEditor.ready(function(K) {
			K.create('#textarea_content', {
			uploadJson : '/upload/INFORMATION',
			allowFileManager : false
		});
	});
/*]]>*/
</script>